home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / visds / dlgtest.dsc < prev    next >
Text File  |  1999-05-02  |  3KB  |  104 lines

  1.     title Dialog Example
  2.     option scale,96
  3.   DIALOG CREATE,Dialog test,-1,0,300,308,SAVEPOS,CLASS TTestDlg
  4.   DIALOG ADD,STYLE,Hyper,,,C,,LTBLUE
  5.   DIALOG ADD,STYLE,BigText,Arial,12,B
  6.   DIALOG ADD,STYLE,Bold,MS Sans Serif,8,B
  7.     DIALOG ADD,MENU,File,Exit
  8.     DIALOG ADD,MENU,Help,About Dlgtest
  9.   DIALOG ADD,BITBTN,New,3,4,24,24,dlgtest.dsr|0
  10.   DIALOG ADD,BITBTN,Open,3,30,24,24,dlgtest.dsr|247
  11.   DIALOG ADD,GROUP,GROUP1,0,0,304,2
  12.   DIALOG ADD,Text,Txt,36,10,,,Enter a filename:,BigText
  13.   DIALOG ADD,Edit,edt,56,10,,,c:\autoexec.bat
  14.   DIALOG ADD,list,lst,82,10,,80,click
  15.   DIALOG ADD,COMBO,Combo,170,10,,,This is a combo control,CLICK,EXIT
  16.   DIALOG ADD,RADIO,rg,38,208,80,124,Radio &Group,Button 1|Button 2|Button 3|Button 4|Button 5,Button 1,click
  17.   DIALOG ADD,check,chk,172,210,80,,Check box,,click,bold
  18.   DIALOG ADD,BITMAP,bmp,192,216,68,70,dlgtest.dsr|795,hand,STRETCH
  19.   DIALOG ADD,progress,prog,200,10,,,50
  20.   DIALOG ADD,BUTTON,OK,256,10,64,24,&OK,default,Bold
  21.   DIALOG ADD,BUTTON,Run,256,124,64,24,&Run,Bold
  22.   DIALOG ADD,TEXT,Txt2,232,10,180,,Visit http://www.vds.sade.net/,HYPER,HAND
  23.   DIALOG ADD,status,stat,Interact with the dialog controls
  24.   DIALOG ADD,GROUP,GROUP2,28,0,304,2
  25.   DIALOG SHOW
  26.     rem adjust dialog height for status bar height
  27.     rem in case a different tooltip font is specified in Windows settings
  28.     DIALOG SETPOS,,,,,@sum(288,@dlgpos(stat,H))
  29.     LIST loadfile,lst,dlgtest.dsr|494
  30.   LIST loadtext,COMBO
  31. "This is the combo list line 1
  32. "This is the combo list line 2
  33. "This is the combo list line 3
  34.   %P = @sendmsg(~lst,1045,1000,0)
  35. :evloop
  36.   wait 0.1,event
  37.   %E = @event()
  38.       goto %E
  39. :TIMER
  40.   %P = @succ(%P)
  41.   dialog set,prog,%P
  42.   goto evloop
  43. :ExitMENU
  44. :OKButton
  45.   exit
  46. :RunBUTTON
  47.   shell open,@windir()\notepad.exe,c:\autoexec.bat,,wait
  48.   goto evloop
  49. :HELP
  50.   info You pressed F1 for help
  51.   goto evloop
  52. :About DlgtestMENU
  53.     info Dlgtest 3.0@cr()@cr()A Visual DialogScript demonstration@cr()application.@cr()@cr()Written by Julian Moss.@cr()@cr()Visual DialogScript @sysinfo(dsver)@cr()@cr()Copyright ⌐ 1995 - 1998 S.A.D.E. s.a.r.l.
  54.     goto evloop
  55. :CLOSE
  56.   if @ask(Are you sure you want to close?)
  57.       exit
  58.   end
  59.   goto evloop
  60. :NewButton
  61.     dialog clear,edt
  62.   list clear,lst
  63.   goto evloop
  64. :OpenBUTTON
  65.   %F = @filedlg(*.*,,,multi)
  66.   if @ok()
  67.     dialog set,edt,%F
  68.         list loadfile,lst,%F
  69.   end
  70.   goto evloop
  71. :comboEXIT
  72.   list add,combo,@dlgtext(combo)
  73.   goto evloop
  74. :CLICK
  75.   if @equal(@click(B),RIGHT)
  76.     dialog popup,Copy|Paste
  77.   end
  78.   goto evloop
  79. :lstCLICK
  80.   dialog set,stat,List selection: @dlgtext(lst)
  81.   goto evloop
  82. :rgCLICK
  83.   dialog set,stat,Radio button selected: @dlgtext(rg)
  84.   goto evloop
  85. :chkCLICK
  86.   dialog set,stat,Check box state: @dlgtext(chk)
  87.   goto evloop
  88. :comboCLICK
  89.   dialog set,stat,Combo list selection: @dlgtext(combo)
  90.   goto evloop
  91. :bmpCLICK
  92.   dialog set,stat,Bitmap clicked at @click(x)", "@click(y)
  93.   play sound.wav,wait
  94.   goto evloop
  95. :copyMENU
  96.   list copy,lst
  97.   goto evloop
  98. :pasteMENU
  99.   list paste,lst
  100.   goto evloop
  101. :txt2CLICK
  102.   shell open,@strdel(@dlgtext(txt2),1,6)
  103.   goto evloop
  104.